class ZCL_DOME_001 definition
  public
  create private .

public section.

  interfaces IF_OO_ADT_CLASSRUN .
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS ZCL_DOME_001 IMPLEMENTATION.


  METHOD if_oo_adt_classrun~main.


       "Example 1 Create Bill of Material Header
*      MODIFY ENTITIES OF i_billofmaterialtp_2
*          ENTITY BillOfMaterial
*          CREATE
*          SET FIELDS WITH VALUE
*          #( (
*          %cid = '12'
*          Material = 'FG126-1'
*          BillOFMaterialVariant = '05'
*          BillOfMaterialVariantUsage = '1'
*          Plant = '1010'
*          BillOfMaterialCategory = 'M'
*          ) )
*
*          MAPPED DATA(ls_mapped)
*          FAILED DATA(ls_failed)
*          REPORTED DATA(ls_reported).
*
*      COMMIT ENTITIES BEGIN
*      RESPONSE OF i_billofmaterialtp_2
*      FAILED DATA(ls_save_failed)
*      REPORTED DATA(ls_save_reported).
*      COMMIT ENTITIES END.

"""" Example 2 Create Bill of Material Item by Header """"
  MODIFY ENTITIES OF i_billofmaterialtp_2
        ENTITY billofmaterial
          CREATE BY \_billofmaterialitem
          AUTO FILL CID
            SET FIELDS WITH VALUE
              #( (

                    Billofmaterial            = '00000209'
                    BillOfMaterialCategory    = 'M'
                    BillOfMaterialVariant     = '05'
                    BillOfMaterialVersion     = ''
                    EngineeringChangeDocument = ''
                    Material                  = 'FG126-1'
                    Plant                     = '1010'

                  %target = VALUE #(

                     (

                      billofmaterialitemcategory = 'L'
                      billofmaterialitemquantity = '10'
                      billofmaterialitemunit     = 'PCS'
                      billofmaterialcomponent    = 'SG21' )

                    )


               ) )

            MAPPED DATA(ls_mapped)
            FAILED DATA(ls_failed)
            REPORTED DATA(ls_reported).

OUT->write( ls_mapped ).



  ENDMETHOD.
ENDCLASS.
